<!DOCTYPE html>
<html class="no-js" lang="">

<head>#include( "/public-head.html")
</head>

<body style="background-color: #ffffff !important;">
	<div class="main-content checkbo">
		<div class="panel mb25">
			<div class="panel-heading border">#if($!role.roleId) 编辑#else 添加#end角色</div>
			<div class="panel-body">
				<div class="row no-margin">
					<div class="col-lg-12">
						<form action="/vrs/role/edit.jsn" data-url="/vrs/role/list.jsn" id="roleForm" name="ajaxForm"
							class="form-horizontal bordered-group" role="form">
							<input type="hidden" name="role.roleId" value="$!{role.roleId}">
							<div class="form-group">
								<label class="col-sm-2 control-label">名称</label>
								<div class="col-sm-10">
									<input type="text" name="role.name" value="$!{role.name}" class="form-control w150" placeholder="角色名称">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">描述</label>
								<div class="col-sm-10">
                                	<textarea class="form-control"  name="role.description" rows="3">$!{role.description}</textarea>
                            	</div>
							</div>
							<div class="form-group">
								<label></label>
								<div>
									<button type="button" onclick="submitPerForm()" class="btn btn-primary mr10">#if($!role.roleId) 修改#else 保存#end</button>
									<button class="btn btn-default">返回</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>


	</div>
	<!-- /main area -->

	#include( "/public-script.html") 
	#include( "/sub-script.html")
	<script>
		//提交
		function submitPerForm() {
			if (!$('#roleForm').valid()) {
				return false;
			} else {
				$('#roleForm').submit();
			}
		}
	</script>
</body>

</html>
